package com.mall4j.cloud.api.coupon.bo;

import com.mall4j.cloud.common.order.vo.ShopCartOrderMergerVO;

/**
 * 无门槛劵模版
 * @author ljh
 */
public class NoThresholdCoupon extends CouponBO{
    private long discount;

    public NoThresholdCoupon(long discount) {
        this.discount = discount;
    }

    @Override
    public boolean canUse(CouponUseContext useContext) {
        return true;
    }

    @Override
    public long applyDiscountInternal(CouponUseContext context) {
        return discount;
    }

    @Override
    public String toString() {
        return "NoThresholdCoupon{" +
                "discount=" + discount +
                '}';
    }
}
